"""renranapi URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.contrib import admin
from django.urls import path, include,re_path
import xadmin
from django.views.static import serve

from renranapi.apps.article import views

xadmin.autodiscover()
from xadmin.plugins import xversion
xversion.register_models()
urlpatterns = [
    path("collection/", views.MyCollectionListAPIView.as_view()),
    # path("collect/", views.CollectionCreateAPIView.as_view()),
    re_path("collection/(?P<pk>\d+)/", views.CollectionUpdateAPIView.as_view()),
    re_path("article/(?P<pk>\d+)/", views.ArticleUpdateDestroyAPIView.as_view()),
    path("collection/article/", views.ArticleOfCollectionAPIView.as_view()),
    re_path("^public/(?P<pk>\d+)/$", views.ArticleAPIView.as_view()),
    re_path("^interval/(?P<pk>\d+)/$", views.ArticleIntervalAPIView.as_view()),
    re_path("^(?P<pk>\d+)/$", views.ArticleInfoAPIView.as_view()),
    path("image/", views.ArticleImageAPIView.as_view()),
    path("special/", views.SpecialListAPIView.as_view()),
    path("post/", views.PostArticleAPIView.as_view()),
    re_path("^retrieve/(?P<pk>\d+)/$", views.ArticleRetrieveAPIView.as_view()),
    path("focus/", views.UserFocusAPIView.as_view()),
    path("article/", views.ArticleListAPIView.as_view()),

]
